Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove open/elasticsearch init container #395

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

shreddedbacon
Copy link
Member

With uselagoon/lagoon-charts#700 we should be able to remove the initContainer that sets sysctl values with privileged access.

The daemonset in the chart will do it instead, best yet would be the underlying k8s nodes having this value increased by default though.

Copy link
Member

@tobybellwood tobybellwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, safe to remove

@shreddedbacon shreddedbacon merged commit a2d5e22 into main Feb 13, 2025
2 checks passed
@shreddedbacon shreddedbacon deleted the search-sysctl-init branch February 13, 2025 23:47
@shreddedbacon
Copy link
Member Author

To remove the initcontainer from the deployments, the following can be used for opensearch and elasticsearch (just change the service-type selector)

for dep in $(kubectl get deployments --no-headers -A -l lagoon.sh/service-type=opensearch-persistent -o json | jq -c '.items[] | @base64')
do
    depdata=$(echo "${dep}" | jq -rc '@base64d')
    namespace=$(echo ${depdata} | jq -r '.metadata.namespace')
    deployment=$(echo ${depdata} | jq -r '.metadata.name')
    kubectl -n ${namespace} patch deployment ${deployment} --type json -p='[{"op": "remove", "path": "/spec/template/spec/initContainers/0"}]'
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants